package com.neusoft.elmboot.service.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.neusoft.elmboot.mapper.UserMapper;
import com.neusoft.elmboot.po.User;
import com.neusoft.elmboot.service.UserService;

import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService{
 
 @Autowired
 private UserMapper userMapper;
 @Override
 public User getUserByIdByPass(User user) {
 return userMapper.getUserByIdByPass(user);
 }
 
 @Override
 public int getUserById(String userId) {
 return userMapper.getUserById(userId);
 }
 
 @Override
 public int saveUser(User user) {
 return userMapper.saveUser(user);
 }

 @Override
 public int UpdateCredit(String userId, Integer credit) {
  return userMapper.UpdateCredit(userId,credit);
 }

 @Override
 public int updateUserInfo(User user) {
  return userMapper.updateUserInfo(user);
 }

 @Override
 public int updateUserPass(User user) {
  return userMapper.updateUserPass(user);
 }
 
 @Override
 public int getUserRoleById(User user) {
	 return userMapper.getUserRoleById(user);
 }
 @Override
 public String getUserInfoById(String userId) {
	 return userMapper.getUserInfoById(userId);
 }
}
